Skip to content

Integration guide and quickstarts #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

christianalfoni
Copy link
Contributor

No description provided.

Copy link

codesandbox bot commented Jul 2, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Jul 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
projects-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2025 0:17am

Copy link
Contributor

@tristandubbeld tristandubbeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some notes to self to improve this if I find the time.


- `--vm-build-tier` - The tier to use when building the template. You can improve build time, especially with custom Docker configurations. This will not influence the `vm-tier`
- `--vm-tier` - The default minimum tier to give Sandboxes created from the template. Note that you can set a higher tier when creating the Sandbox, but not lower
- `--privacy` - By default the Sandbox is `unlisted`, meaning that its hosts are public, but the Sandbox is not discoverable without knowing the `id`. We recommend setting this to `private`, though this will require you to generate host tokens to access the hosts on the Sandbox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --privacy command doesn't seem to exist.

This configures an iframe to show the preview. The power of this API is that you can interact with the iframe. Due to domain restrictions you will need to trust your development and application hosts using the CLI:

```sh
npx @codesandbox/sdk preview-hosts preview-hosts add my-domain.io
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
npx @codesandbox/sdk preview-hosts preview-hosts add my-domain.io
npx @codesandbox/sdk preview-hosts add my-domain.io

You build the template with:

```bash
CSB_API_KEY=my-key npx @codesandbox/sdk build ./my-template-folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can consider adding the use of the csb command instead of npx @codesandbox/sdk or show both. Maybe also consider adding export CSB_API_KEY=key to the document.

})
```

Read more at http://localhost:3000/sdk/browser-previews
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants